<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        *{margin: 0;padding: 0;}
        body{min-width: 760px;}
        .top,.bottom{
            height: 30px;
        }    
        .middle{
            padding: 0 120px;
            overflow: hidden;
        }
        .main{
            float: left;
            width: 100%;
        }

        .left,.right{
            float: left;
            width: 100px;
            position: relative;/*相对自身定位 实现间距*/
        }

        .left{
            margin-left: -100%;
            left: -120px;
        }
        .right{
            margin-left: -100px;
            right:-120px;
        }

    </style>
</head>

<body>
    <div class="parent" id="parent">
        <div class="top" style="background-color: green;">
            <p>top</p>
        </div>
        <div class="middle" style="background-color: red;">
            <div class="main" style="background-color: #fff;">
                <p>main</p>
                <p>main</p>
            </div>
            <div class="left" style="background-color: yellow;">
                <p>left</p>
            </div>
            <div class="right" style="background-color: yellow;">
                <p>right</p>
            </div>
        </div>
        <div class="bottom" style="background-color: black;">
            <p>bottom</p>
        </div>
    </div>
</body>

</html>